<template>
    <div >
        <yu-ace-editor :data="data.dictJson" lang="json" v-model:value="data.dictJson" class="edit-style" height="55vh"></yu-ace-editor>
    </div>

</template>
<script setup>
  import {reactive, ref, toRef, getCurrentInstance, onBeforeMount, onMounted} from 'vue';
  const {proxy} = getCurrentInstance();
  const props = defineProps({
    data:[]
  })
  const data = reactive({
    dictJson:"[]"
  })
  onBeforeMount(()=>{
    loadDictItem();
  })
const loadDictItem = ()=>{
    proxy.$api.data.getSysDictByCode(props.data.dictCode).then(res=>{
       console.log(res)
        data.dictJson = JSON.stringify(res,null, 2)
    })
}
</script>
<style lang="scss" scoped>
.edit-style{
    padding:10px;
    height: '60vh';
    
}
    
</style>